<template>
    <div style="background-color:aqua">
        <h1>father</h1>
        <child :message="msg"></child>
        <h1>监听</h1>
        {{ count }}
        <child @increaseBy="increaseCount"></child>
        <!-- 监听test -->
    </div>
</template>

<script>
import child from '../components/DateSon.vue'
export default {
    components: {child},
    data(){
        return {
            count: 0,
            msg: 'nihao'
        }
    },
    methods:{
        increaseCount(n){
            console.log(n);
            this.count = this.count + n;
        }
    }
}
</script>